<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      :inline="true"
      v-show="showSearch"
      label-width="98px"
    >
      <el-form-item label="设备名称" prop="name">
        <el-input
          v-model="queryParams.name"
          placeholder="请输入设备名称"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="设备编码" prop="code">
        <el-input
          v-model="queryParams.code"
          placeholder="请输入设备编码"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="设备类型" prop="type">
        <!--<el-select v-model="queryParams.type" placeholder="请选择设备类型" clearable size="small">
          <el-option label="请选择字典生成" value="" />
        </el-select>-->
        <treeselect :searchable="false" 
          v-model="queryParams.type"
          :options="typeOptions"
          :append-to-body="true"
          :show-count="true"
          placeholder="请选择设备类别"
        />
      </el-form-item>
      <el-form-item label="设备厂家" prop="eqpFactoryId">
        <!--<el-input
          v-model="queryParams.eqpFactoryId"
          placeholder="请输入设备厂家"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />-->
        <el-select
          v-model="queryParams.eqpFactoryId"
          placeholder="请选择设备厂家"
          clearable
          size="small"
        >
          <el-option
            v-for="dict in eqpFactoryOptions"
            :key="dict.id"
            :label="dict.name"
            :value="dict.id"
          />
        </el-select>
      </el-form-item>
     <!-- <el-form-item label="所属生产线" prop="productLineId">
        &lt;!&ndash;<el-select v-model="queryParams.productLineId" placeholder="请选择所属生产线" clearable size="small">
          <el-option label="请选择字典生成" value="" />
        </el-select>&ndash;&gt;
        <el-select
          v-model="queryParams.productLineId"
          placeholder="请选择所属生产线"
          clearable
          size="small"
        >
          <el-option
            v-for="dict in productLineListOptions"
            :key="dict.id"
            :label="dict.name"
            :value="dict.id"
          ></el-option>
        </el-select>
      </el-form-item>-->
      <el-form-item label="所属基地" prop="deptId">
        <!--<el-select v-model="queryParams.productLineId" placeholder="请选择所属生产线" clearable size="small">
          <el-option label="请选择字典生成" value="" />
        </el-select>-->
        <el-select
          v-model="queryParams.deptId"
          placeholder="请选择所属基地"
          clearable
          size="small"
        >
          <el-option
            v-for="dict in factoryListOption"
            :key="dict.deptId"
            :label="dict.name"
            :value="dict.deptId"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="状态" prop="status">
        <el-select
          v-model="queryParams.status"
          placeholder="请选择状态"
          clearable
          size="small"
        >
          <el-option
            v-for="dict in statusOptions"
            :key="dict.dictValue"
            :label="dict.dictLabel"
            :value="dict.dictValue"
          />
        </el-select>
      </el-form-item>
      <!--<el-form-item label="出厂日期" prop="factoryDate">
        <el-date-picker
          :editable="false"
          clearable
          size="small"
          v-model="queryParams.factoryDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择出厂日期"
        >
        </el-date-picker>
      </el-form-item>-->
     <!-- <el-form-item label="报警提醒时间" prop="alarmDate">
        <el-date-picker
          :editable="false"
          clearable
          size="small"
          v-model="queryParams.alarmDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择报警提醒时间"
        >
        </el-date-picker>
      </el-form-item>-->
      <!--<el-form-item label="启用时间" prop="startDate">
        <el-date-picker
          :editable="false"
          clearable
          size="small"
          v-model="queryParams.startDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="选择启用时间"
        >
        </el-date-picker>
      </el-form-item>-->
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['basic:eqpInfo:add']"
          >新增</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['basic:eqpInfo:edit']"
          >修改</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['basic:eqpInfo:remove']"
          >删除</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['basic:eqpInfo:export']"
          >导出</el-button
        >
      </el-col>
      <right-toolbar
        :showSearch.sync="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>

    <el-table
      v-loading="loading"
      :data="eqpInfoList"
      @selection-change="handleSelectionChange"
    >
      <el-table-column type="selection" width="10" align="center" />
      <el-table-column label="编号" align="center" prop="id" />
      <el-table-column label="设备名称" align="center" prop="name" />
      <el-table-column label="所属基地" align="center" prop="factoryName" />
      <el-table-column label="设备编码" align="center" prop="code" />
      <el-table-column label="设备类型" align="center" prop="typeName" />
      <el-table-column label="设备厂家" align="center" prop="eqpFactoryName" />
      <el-table-column label="设备型号" align="center" prop="unitType" />
      <el-table-column label="规格型号" align="center" prop="model" />
      <!--<el-table-column label="二维码信息" align="center" prop="qrcode" />
      <el-table-column label="设备照片" align="center" prop="picUrl" />-->
      <el-table-column
        label="所属生产线"
        align="center"
        prop="productLineName"
      />

      <!-- <el-table-column label="电压电压" align="center" prop="voltage" />
      <el-table-column label="显示顺序" align="center" prop="orderNum" />
      <el-table-column label="电源赫兹" align="center" prop="hertz" />
      <el-table-column label="额定电流" align="center" prop="rated" />
      <el-table-column label="生产能力" align="center" prop="capacity" />
      <el-table-column label="设备重量" align="center" prop="weight" />
      <el-table-column label="设备尺寸" align="center" prop="size" />
      <el-table-column label="装机功率" align="center" prop="power" />-->
      <el-table-column label="出厂编号" align="center" prop="factoryNum" />
      <!--<el-table-column label="出厂日期" align="center" prop="factoryDate">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.factoryDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column label="生产日期" align="center" prop="makeDate">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.makeDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column label="购买时间" align="center" prop="buyDate">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.buyDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column label="报警提醒时间" align="center" prop="alarmDate">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.alarmDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column label="启用时间" align="center" prop="startDate">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.startDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>-->
      <el-table-column
        label="状态"
        align="center"
        prop="status"
        :formatter="statusFormat"
      />
      <el-table-column
        label="排序"
        align="center"
        prop="orderNum"
      />
      <el-table-column
        label="操作"
        align="center"
        class-name="small-padding fixed-width " width="200px"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-view"
            @click="handleView(scope.row)"
            >查看</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['basic:eqpInfo:edit']"
            >修改</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['basic:eqpInfo:remove']"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改设备信息管理对话框 -->
    <el-dialog v-myFullscreen

      :title="title"
      :visible.sync="open"
      width="700px"
    >
      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="设备名称" prop="name">
              <el-input
                v-model="form.name"
                placeholder="请输入设备名称"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="设备编码" prop="code">
              <el-input
                v-model="form.code"
                placeholder="请输入设备编码"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="设备类型" prop="type">
              <!--<el-select v-model="form.type" placeholder="请选择设备类型" :disabled="openDisabled">
                    <el-option label="请选择字典生成" value="" />
                  </el-select>-->
              <treeselect :searchable="false" 
                v-model="form.type"
                :options="typeOptions"
                :show-count="true"
                :append-to-body="false"
                placeholder="请选择设备类别"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="设备厂家" prop="eqpFactoryId">
              <!--<el-input v-model="form.eqpFactoryId" placeholder="请输入设备品牌" :disabled="openDisabled" />-->
              <el-select
                v-model="form.eqpFactoryId"
                placeholder="请选择设备厂家"
                clearable
                size="small"
                :disabled="openDisabled"
              >
                <el-option
                  v-for="dict in eqpFactoryOptions"
                  :key="dict.id"
                  :label="dict.name"
                  :value="dict.id"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="设备型号" prop="unitType">
              <el-input
                v-model="form.unitType"
                type="input"
                placeholder="请输入设备型号"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="规格型号" prop="model">
              <el-input
                v-model="form.model"
                placeholder="请输入规格型号"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <!-- <el-col :span="12">
                <el-form-item label="二维码信息" prop="qrcode">
                  <el-input v-model="form.qrcode" placeholder="请输入二维码信息" :disabled="openDisabled" />
                </el-form-item>
            </el-col>-->
          <el-col :span="12">
            <el-form-item label="所属基地" prop="deptId">
              <!--<el-select v-model="form.productLineId" placeholder="请选择所属生产线" :disabled="openDisabled">
                    <el-option label="请选择字典生成" value="" />
                  </el-select>-->
              <el-select
                v-model="form.deptId"
                placeholder="请选择所属基地"
                :disabled="openDisabled"
                clearable
                size="small"
              >
                <el-option
                  v-for="dict in factoryListOption"
                  :key="dict.deptId"
                  :label="dict.name"
                  :value="dict.deptId"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>


          <el-col :span="12">
            <el-form-item label="所属生产线" prop="productLineId">
              <!--<el-select v-model="form.productLineId" placeholder="请选择所属生产线" :disabled="openDisabled">
                    <el-option label="请选择字典生成" value="" />
                  </el-select>-->
              <el-select
                v-model="form.productLineId"
                placeholder="请选择所属生产线"
                :disabled="openDisabled"
                clearable
                size="small"
              >
                <el-option
                  v-for="dict in productLineListOptions"
                  :key="dict.id"
                  :label="dict.name"
                  :value="dict.id"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="状态" prop="status">
              <el-select
                v-model="form.status"
                placeholder="请选择状态"
                :disabled="openDisabled"
              >
                <el-option
                  v-for="dict in statusOptions"
                  :key="dict.dictValue"
                  :label="dict.dictLabel"
                  :value="dict.dictValue"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="电压(V)" prop="voltage">
              <el-input
                v-model="form.voltage"
                placeholder="请输入电压"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="电源赫兹(HZ)" prop="hertz">
              <el-input
                v-model="form.hertz"
                placeholder="请输入电源赫兹"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="额定电流(A)" prop="rated">
              <el-input
                v-model="form.rated"
                placeholder="请输入额定电流"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="生产能力" prop="capacity">
              <el-input
                v-model="form.capacity"
                placeholder="请输入生产能力"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="设备重量(Kg)" prop="weight">
              <el-input
                v-model="form.weight"
                placeholder="请输入设备重量"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="设备尺寸(cm)" prop="size">
              <el-input
                v-model="form.size"
                placeholder="请输入设备尺寸"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="装机功率(kw)" prop="power">
              <el-input
                v-model="form.power"
                placeholder="请输入装机功率"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="出厂编号" prop="factoryNum">
              <el-input
                v-model="form.factoryNum"
                placeholder="请输入出厂编号"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="出厂日期" prop="factoryDate">
              <el-date-picker
                :editable="false"
                clearable
                size="small"
                v-model="form.factoryDate"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="选择出厂日期"
                :disabled="openDisabled"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="生产日期" prop="makeDate">
              <el-date-picker
                :editable="false"
                clearable
                size="small"
                v-model="form.makeDate"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="选择生产日期"
                :disabled="openDisabled"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="购买时间" prop="buyDate">
              <el-date-picker
                :editable="false"
                clearable
                size="small"
                v-model="form.buyDate"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="选择购买时间"
                :disabled="openDisabled"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="报警提醒时间" prop="alarmDate">
              <el-date-picker
                :editable="false"
                clearable
                size="small"
                v-model="form.alarmDate"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="选择报警提醒时间"
                :disabled="openDisabled"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="启用时间" prop="startDate">
              <el-date-picker
                :editable="false"
                clearable
                size="small"
                v-model="form.startDate"
                type="date"
                value-format="yyyy-MM-dd"
                placeholder="选择启用时间"
                :disabled="openDisabled"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
            <el-col :span="12">
              <el-form-item label="显示排序" prop="orderNum">
                <el-input-number
                  v-model="form.orderNum"
                  controls-position="right"
                  :min="0"
                  :disabled="openDisabled"
                />
              </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="图片" v-if="!openDisabled">
              <imageUpload v-model="form.picUrl"   :disabled="openDisabled" />
            </el-form-item>
            <el-form-item label="图片" v-if="openDisabled">
              <img :src="form.picUrl" style="width:300px;">
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="备注" prop="remark">
              <el-input
                v-model="form.remark"
                type="textarea"
                placeholder="请输入内容"
                :disabled="openDisabled"
              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer" v-if="!openDisabled">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listEqpInfo,
  getEqpInfo,
  delEqpInfo,
  addEqpInfo,
  updateEqpInfo,
  selectList,
  factorySelectList,
  getProductlineList,
  getSelectList,
} from "@/api/basic/eqpInfo/eqpInfo";
import RightPanel from "../../../../components/RightPanel/index";
import Treeselect from "@riophae/vue-treeselect";
export default {
  name: "EqpInfo",
  components: { RightPanel, Treeselect },
  data() {
    return {
      //弹窗是否禁止编辑
      openDisabled: true,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 设备信息管理表格数据
      eqpInfoList: [],
      factoryListOption:[],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 状态字典
      statusOptions: [],
      typeOptions: [],
      /*defaultProps: {
        children: "children",
        label: "name" +
          ""
      },*/
      eqpFactoryOptions: [],
      productLineListOptions: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        name: null,
        code: null,
        type: null,
        eqpFactoryId: null,
        productLineId: null,
        status: null,
        factoryDate: null,
        alarmDate: null,
        startDate: null,
      },
      isLoading: false,
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        name: [{ required: true, message: "设备名称不能为空" }],
        code: [{ required: true, message: "设备编码不能为空" }],
        type: [{ required: true, message: "设备类型不能为空" }],
        eqpFactoryId: [{ required: true, message: "设备厂家不能为空" }],
        productLineId: [{ required: true, message: "所属产线不能为空" }],
      },
    };
  },
  created() {
    this.getList();
    this.getDicts("eqp_status").then((response) => {
      this.statusOptions = response.data;
    });
    this.getTypeList();
    this.getFactoryList();
    this.getProductlineList();
    this.getSelectList();
  },
  methods: {
    /** 查询设备信息管理列表 */
    getList() {
      this.loading = true;
      listEqpInfo(this.queryParams).then((response) => {
        this.eqpInfoList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    getSelectList() {
      getSelectList().then(response => {
        this.factoryListOption = response.data;
      });
    },

    getProductlineList() {
      getProductlineList().then((response) => {
        this.productLineListOptions = response.data;
      });
    },
    getTypeList() {
      selectList().then((response) => {
        this.typeOptions = response.data;
      });
    },
    getFactoryList() {
      factorySelectList().then((response) => {
        this.eqpFactoryOptions = response.rows;
      });
    },
    // 状态字典翻译
    statusFormat(row, column) {
      return this.selectDictLabel(this.statusOptions, row.status);
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        name: null,
        code: null,
        type: null,
        eqpFactoryId: null,
        unitType: null,
        model: null,
        qrcode: null,
        picUrl: null,
        productLineId: null,
        status: null,
        voltage: null,
        orderNum: null,
        hertz: null,
        rated: null,
        capacity: null,
        weight: null,
        size: null,
        power: null,
        factoryNum: null,
        factoryDate: null,
        makeDate: null,
        buyDate: null,
        alarmDate: null,
        startDate: null,
        delFlag: null,
        remark: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.openDisabled = false;
      this.open = true;
      this.title = "添加设备信息管理";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      this.openDisabled = false;
      const id = row.id || this.ids;
      getEqpInfo(id).then((response) => {
        this.form = response.data;
        this.open = true;
        this.title = "修改设备信息管理";
      });
    },
    /** 查看按钮 */
    handleView(row) {
      this.reset();
      this.openDisabled = true;
      const id = row.id || this.ids;
      getEqpInfo(id).then((response) => {
        this.form = response.data;
        this.open = true;
        this.title = "查看设备信息管理";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          this.isLoading = true;
          if (this.form.id != null) {
            updateEqpInfo(this.form)
              .then((response) => {
                this.isLoading = false;
                this.msgSuccess("修改成功");
                this.open = false;
                this.getList();
              })
              .catch((error) => {
                this.isLoading = false;
              });
          } else {
            addEqpInfo(this.form)
              .then((response) => {
                this.isLoading = false;
                this.msgSuccess("新增成功");
                this.open = false;
                this.getList();
              })
              .catch((error) => {
                this.isLoading = false;
              });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$confirm(
        '是否确认删除设备信息管理编号为"' + ids + '"的数据项?',
        "警告",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      )
        .then(function () {
          return delEqpInfo(ids);
        })
        .then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "basic/eqpInfo/export",
        {
          ...this.queryParams,
        },
        '设备信息'+this.parseTime(new Date)+'.xlsx'
      );
    },
  },
};
</script>
